﻿using UnityEngine;
using System.Collections;

public class GameOverScreen : MonoBehaviour {
	public Transform gameManager;
	// Use this for initialization
	void Awake(){
		DontDestroyOnLoad (gameManager);
		}

	void Start () {
		//DontDestroyOnLoad (gameManager);

	}
	
	// Update is called once per frame
	void Update () {
	
	}

	void OnGUI(){
		GUI.Label(new Rect(Screen.width/2-30, Screen.height/2-100,100,100),"GameOver");

		if (GUI.Button (new Rect (Screen.width / 2-50, Screen.height / 2, 100, 100), "Restart Game")) {
			GameManager.playerLives = 3;
			Application.LoadLevel("Level 1");		
		}

	}
}
